//
//  STHairProTypeCell.m
//  YiYueStore
//
//  Created by zhouzhouzhou on 2018/10/23.
//  Copyright © 2018年 YuYiLian. All rights reserved.
//

#import "STHairProTypeCell.h"

@implementation STHairProTypeCell

- (id)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        // 初始化时加载collectionCell.xib文件
        NSArray *arrayOfViews =
        [[NSBundle mainBundle] loadNibNamed:@"STHairProTypeCell"
                                      owner:self
                                    options:nil];
        
        self = [arrayOfViews objectAtIndex:0];
    }
    return self;
}

-(void)setOwnCollectionCellWithData:(id)data{
    self.layer.borderColor = [UIColor orangeColor].CGColor;
    self.layer.borderWidth = 1;
    if ([data isKindOfClass:[STHairFeaTureModel class]]) {
        STHairFeaTureModel * featureModel = data;
        self.typeLab.text = [NSString stringWithFormat:@"%d",featureModel.count];
        self.numLab.text = featureModel.feaTureName;
    }else if ([data isKindOfClass:[STHairHairstyleModel class]]) {
        STHairHairstyleModel * hairstyleModel = data;
        self.typeLab.text = [NSString stringWithFormat:@"%d",hairstyleModel.count];
        self.numLab.text = hairstyleModel.hairstyleName;
    }
    
}

@end
